home *** CD-ROM | disk | FTP | other *** search
/ Info-Mac 3 / Info_Mac_1994-01.iso / Games / Arcade / Tetris Max 2.2 / Making Your Own Music < prev    next >
Text File  |  1993-11-12  |  3KB  |  31 lines

  1. When Tetris Max is launched, it looks for a file named "Tetris Max Music" in the same folder as the application, and loads the background music from that file. You can have Tetris Max play different music simply by putting a new "Tetris Max Music" file in the folder and moving/renaming the old one. You can also create your own music files if you have a hankering to do that sort of thing. Here's how.
  2.  
  3. Get ahold of some music, something that won't grate on your nerves after 2 minutes of listening. Break it up into segments, such that the entire piece of music can be played by playing segments in the appropriate order. If there is a section of the music that plays more than once, you can save memory by making it a single segment and playing it several times. 
  4.  
  5. Using ResEdit, create a new ResEdit document. Change its creator to "log_" and its type to "tMUS". Add your music segments to the document as snd resources. 
  6.  
  7. To play your music, you need to tell Tetris Max in what order your segments should be played. When Tetris Max reaches the end of the order you've specified, it starts over at the point in the order where it finds the first occurrence of the snd resouce named "repeat". If no such resource exists, it starts over at the beginning of the order.
  8. For example, say you have four music segments (snd resources) named SegA, SegB, SegC, and SegD. Let's say that to play your music, you need to play them in this order:
  9.  
  10. SegA SegB SegB SegC SegD SegB SegB SegC SegD SegB SegB SegC SegD .....
  11.  
  12. Then you would rename SegB to repeat, and give Tetris Max the order:
  13.  
  14. SegA repeat repeat SegC SegD
  15.  
  16. The order is specified in STR# resource 128. The name of the first segment to play goes at index 1, the second at index 2, etc. See one of the music files included with Tetris Max for an example.
  17.  
  18. You can put a description of your music, such as title, author, etc, in STR# resource 129, index 1. This string will be displayed whenever the user selects the "about background music" option from the apple menu.
  19.  
  20. Things to watch out for:
  21. * The snd resources must all be format 1 resources.
  22. * If the snd resources are marked "locked" in the music file, you may need to increase Tetris Max's application memory size, depending on how large the snd resources are. If things are crashing inexplicably or the music turns to noise, try increasing the memory allocated to the program.
  23. * If the snd resources are marked "purgeable", the program will attempt to dynamically load them as they are needed. This makes it possible to use a large number of snd resources without needing to increase the application memory size. However,  marking the resouces "purgeable" can result in audible delays between music segments as the next segment is loaded from disk. 
  24. * I've had problems with the music when the snd resources are neither "locked" nor "purgeable", so proceed at your own risk if you try this.
  25.  
  26. Questions? Comments? I'd love to hear them!
  27. Steve Chamberlin
  28. Log Software
  29. 42 Craigie St. #3
  30. Somerville, MA 02143
  31. email: granola@aol.com